package day240816;

import java.util.Arrays;
import java.util.List;

public class ArrayToListDemo {
    public static void main(String[] args) {
        Integer[] array = {1,2,3,5,7};
        System.out.println(Arrays.toString(array));
        List<Integer> list = Arrays.asList(array);
        System.out.println("集合："+list);

        array[1]=20;//改变数组
        System.out.println(Arrays.toString(array));
        System.out.println(list);

        list.set(2,30);//改变集合
        System.out.println(Arrays.toString(array));
        System.out.println(list);

        //list.add(new Integer(1));

    }
}
